package com.example.mall.controller.v1;

import com.example.mall.common.core.response.SuccessResponse;
import com.example.mall.common.utils.SuccessHelper;
import com.example.mall.entity.Order;
import com.example.mall.service.OrderService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api("/v1/order")
@RestController
@RequestMapping("/order")
public class OrderConterllor {
    @Autowired
    private OrderService orderService;

    @GetMapping("/list")
    public SuccessResponse selectAll() {
        List<Order> result = orderService.selectAll();
        return SuccessHelper.excute("result", result);
    }

    @GetMapping("/save")
    public SuccessResponse save() {
        return null;
    }

    @GetMapping("/update")
    public SuccessResponse update() {
        return null;
    }
}
